<?php
$arr=[
[0,0,0,0,0,0],
[0,0,1,0,0,0],
[0,1,0,0,-1,0],
[0,-1,0,0,1,0],
[0,0,1,0,-1,0],
[0,1,0,0,0,0]
];
$tab="<table border='1' width='300' height='300'>";
for ($i=0; $i <count($arr); $i++) {
	$tab.="<tr>";
	for ($k=0; $k <count($arr[$i]);$k++) {
		if($arr[$i][$k]==0){
			$tab.="<td width='50' height='50'></td>";
		}else if($arr[$i][$k]==1){
			$tab.="<td width='50' height='50' style='border-radius:50%;background-color: red;'></td>";
		}else{
			$tab.="<td width='50' height='50' style='border-radius:50%;background-color: black;'></td>";
		}
	}
	$tab.="</tr>";
}
$tab.="</table>";
echo $tab;

$ziliao=[
"sy1"=>["name"=>"张三","age"=>20,"sex"=>"男"],
"sy2"=>["name"=>"李四","age"=>20,"sex"=>"女"],
"sy3"=>["name"=>"钱多多","age"=>20,"sex"=>"女"],
"sy4"=>["name"=>"王小二","age"=>20,"sex"=>"男"]
];
foreach($ziliao as $key=>$val){
	foreach ($val as $k => $v) {
	echo $key,"--",$k,"---",$v,"<br/>";
	}
}
echo $ziliao["sy2"]["name"];
//排序
$px=[
"a","5",4,8,3
];

$cc=[
"a"=>1,
"c"=>3,
"b"=>20
];
//sort($cc);// -以升序对数组排序
//rsort($px);// - 以降序对数组排序
//asort($cc);// - 根据值，以升序对关联数组进行排序
ksort($cc);// - 根据键，以升序对关联数组进行排序
//arsort($cc);// - 根据值，以降序对关联数组进行排序
//krsort($cc);// - 根据键，以降序对关联数组进行排序
var_dump($cc);
?>